package com.ims.enums;

/**
 * 描述：
 *
 * @author qlp
 * @date 2019-03-06 09:20
 */
public enum MediaTypeEnum {
    DouYin("抖音" ,"DouYin"),
    WeiXin("微信公众号" ,"'WeiXin'"),
    TouTiao("头条号" ,"TouTiao"),
    Kwai("快手","Kwai");

    private String name;
    private String key;

    // 构造方法
    private MediaTypeEnum(String name, String key) {
        this.name = name;
        this.key = key;
    }

    // 普通方法
    public static String getName(String key) {
        for (MediaTypeEnum c : MediaTypeEnum.values()) {
            if (c.getKey().equals(key)) {
                return c.name;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }
}
